﻿@model IEnumerable<CarparkIMS_Model.llqqPlateMapping>

@{
    ViewData["Title"] = "車牌列表";
}

<h1>車牌列表</h1>

<p>
    <a asp-action="Create">
        <input type="button" value="新增車牌" class="btn btn-primary" />
    </a>
</p>
<form asp-controller="PlateRegistration" asp-action="Index" method="get">
    <p>
        搜尋: <input type="text" name="SearchString" />
        <input type="submit" value="篩選" />
    </p>
</form>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.PlateNo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CardID)
            </th>


            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                @*<td>
                    @Html.DisplayFor(modelItem => item.UserID)
                    </td>*@
                <td>
                    @Html.DisplayFor(modelItem => item.PlateNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CardID)
                </td>

                @*<td>
                    @Html.DisplayFor(modelItem => item.Deleted)
                    </td>*@
                <td>
                    <a asp-action="Edit" asp-route-id="@item.ID"><input type="button" value="修改" class="btn btn-secondary" /></a>
                    <a asp-action="Delete" asp-route-id="@item.ID"><input type="button" value="刪除" class="btn btn-danger" /></a>
                </td>
            </tr>
        }
    </tbody>
</table>
